package(default_visibility=["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")


ng_module(
  name = "drag-drop",
  srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
  module_name = "@angular/cdk-experimental/drag-drop",
  assets = [":drop.css"],
  deps = [
    "@rxjs",
    "//src/cdk/platform",
    "//src/cdk/overlay",
    "//src/cdk/bidi",
  ],
  tsconfig = "//src/cdk-experimental:tsconfig-build.json",
)


ts_library(
  name = "drag_and_drop_test_sources",
  testonly = 1,
  srcs = glob(["**/*.spec.ts"]),
  deps = [
    ":drag-drop",
    "//src/cdk/testing",
    "//src/cdk/bidi",
  ],
  tsconfig = "//src/cdk-experimental:tsconfig-build.json",
)

sass_binary(
  name = "drop_scss",
  src = "drop.scss",
)

ts_web_test(
  name = "unit_tests",
  bootstrap = [
    "//:web_test_bootstrap_scripts",
  ],
  tags = ["manual"],

  # Do not sort
  deps = [
    "//:tslib_bundle",
    "//:angular_bundles",
    "//:angular_test_bundles",
    "//test:angular_test_init",
    ":drag_and_drop_test_sources",
  ],
)
